import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  
 
   {
    title: '项目名称',
    align:"center",
    dataIndex: 'projectName',
    width:140
   },
   {
    title: '项目路径',
    align:"center",
    dataIndex: 'projectPath',
    width:200
   },
   {
    title: '所属课程',
    align:"center",
    dataIndex: 'projectPath',
    width:140
   },
   {
    title: '创建时间',
    align:"center",
    dataIndex: 'projectPath',
    width:180

   },
   {
    title: '最后一次运行时间',
    align:"center",
    dataIndex: 'projectPath',
    width:180
   },

];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '项目名称',
    field: 'projectName',
    component: 'JInput',
    //colProps: { span: 6 },
  },
 
];
//表单数据
export const formSchema: FormSchema[] = [
 
  {
    label: '项目名称',
    field: 'projectName',
    component: 'Input',
    required: true,
  },
  {
    label: '所属课程',
    field: 'projectPath',
    
        required: true,
         component: 'ApiSelect',
           componentProps: {
            //  mode: 'multiple',
            // api: getTeacherList,
             labelField: 'managerName',//返回接口数据中的文字
             valueField: 'managerId',
             immediate: false,
           },
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  studentId: {title: '学生id',order: 0,view: 'text', type: 'string',},
  courseId: {title: '课程id',order: 1,view: 'text', type: 'string',},
  projectName: {title: '项目名称',order: 2,view: 'text', type: 'string',},
  projectPath: {title: '项目路径',order: 3,view: 'text', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}
